﻿using Gobang.DataServer.Models;

namespace Gobang.DataServer.DbOperation
{
    public class DictionaryServer : DataServerBase
    {
        public static List<Gb_Dictionary> GetInfoWithGroupName(string groupName)
        {
            return Db.Queryable<Gb_Dictionary>().Where(t => t.GroupName == groupName).ToList();
        }
        public List<Gb_Dictionary> GetInfoWithGroupNames(string groupName)
        {
            return Db.Queryable<Gb_Dictionary>().Where(t => t.GroupName == groupName).ToList();
        }
        public static bool Update(Gb_Dictionary gb)
        {
            return Db.Updateable(gb).ExecuteCommand() > 0;
        }
    }
}
